def read_md_file(file_path):
    """
    读取Markdown文件并保留原始格式
    
    参数:
        file_path (str): Markdown文件的路径
        
    返回:
        str: 包含Markdown内容的字符串，保留所有原始格式
    """
    try:
        with open(file_path, 'r', encoding='utf-8') as file:
            md_content = file.read()
        return md_content
    except FileNotFoundError:
        raise FileNotFoundError(f"文件未找到: {file_path}")
    except UnicodeDecodeError:
        # 如果utf-8失败，尝试其他编码
        try:
            with open(file_path, 'r', encoding='gbk') as file:
                md_content = file.read()
            return md_content
        except Exception as e:
            raise Exception(f"无法解码文件: {e}")
    except Exception as e:
        raise Exception(f"读取文件时出错: {e}")

# 使用示例
if __name__ == "__main__":
    try:
        content = read_md_file("task_knowledge_base.md")
        print("Markdown内容:")
        print(content)
    except Exception as e:
        print(f"错误: {e}")